home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
OPTANS10.ARJ
/
AUSER.H
next >
Wrap
C/C++ Source or Header
|
1992-06-09
|
2KB
|
65 lines
/******************************************************************************
OptANSI Library
Copyright 1992 Michael Dannov
This source is subject to all restrictions specified by the licensing agreement
******************************************************************************/
#define __AUSER_H
#if !defined(__OPTANSI_H)
#include "ansi.h"
#endif
/*****************************************************************************
AUSER.H
This is a header designed to use YOUR text output libraries with OptANSI
functions. Because OptANSI returns pointers that share the same buffer area
for strings, it cannot have multiple calls to similar OptANSI functions in
the same function. Ex: This function below will fail:
printf("%s%sHi", acolor(31), agotoxy(25, 10));
But this would work:
printf(acolor(31));
printf(agotoxy(25, 10);
printf("Hi");
Since you're using this header file, you could write:
acolor(31);
agotoxy(25, 10);
printf("Hi");
Make sure to send these ANSI strings on separate lines.
*****************************************************************************/
/*****************************************************************************
You can substitute printf with your own output function by changing aout
below. Default defines are set to use printf().
*****************************************************************************/
#define aout(prt) printf(prt)
#define agotoxy(x, y) aout(agotoxy(x, y))
#define adown(y) aout(adown(y))
#define aleft(x) aout(aleft(x))
#define asavecursor() aout(asavecursor())
#define arestorecursor() aout(arestorecursor())
#define aclrscr() aout(aclrscr())
#define aclreol() aout(aclreol())
#define acolor(nc) aout(acolor(nc))
#define ahighlight() aout(ahighlight())
#define ablink() aout(ablink())
#define acmd(a, b) aout(acmd(a, b))
#define atest() aout(atest())
#define atest1() aout(atest1())
#define akeyboard(key, str, buf) aout(akeyboard(key, str, buf))
#define amode(mode, cmd) aout(amode(mode, cmd))